package com.macaku.util;


import org.apache.commons.codec.digest.DigestUtils;

import java.util.UUID;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 马拉圈
 * Date: 2023-10-02
 * Time: 2:24
 */

/**
 * MD5加盐加密...
 */
public class MD5Utils {

    // 获取盐值
    public static String getSalt() {
        return UUID.randomUUID().toString().replace("-", "");
    }

    // md5加密
    public static String md5(String normal) {
        return DigestUtils.md5Hex(normal);
    }


}
